﻿using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace Hu.Core.Domains.Basic.Base
{
    /// <summary>
    /// 实体基类
    /// </summary>
    public abstract class HuBaseEntity
    {
        [Key]
        [MaxLength(50)]
        public string Id { get; set; } = Guid.NewGuid().ToString("N");

        public bool TagDeleted { get; set; } = false;

        public DateTime CreateTime { get; set; } = DateTime.Now;

        public DateTime UpdateTime { get; set; } = DateTime.Now;

        [Timestamp]
        public byte[] Version { get; set; }
    }
}
